package com.jsgt.greekfire.common.http

import com.jsgt.greekfire.bean.*
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.POST
import retrofit2.http.Path

interface MarketService {

    /**
     * 获取买入卖出信息
     */
    @POST("api/market/getTickMarket/{delKey}")
    suspend fun getTickMarket(@Path("delKey") delKey: String): ResponseData<TickMarket>

    /**
     * 买入卖出交易
     */
    @POST("api/entrust/addUserEntrust")
    suspend fun addUserEntrust(@Body params: RequestBody): ResponseData<Any>

    /**
     * 委托
     */
    @POST("api/entrust/userEntrustList")
    suspend fun getUserEntrust(@Body params: RequestBody): ResponseData<UserEntrust>

    /**
     * 取消委托
     */
    @POST("api/entrust/cancelUserEntrust")
    suspend fun cancelUserEntrust(@Body params: RequestBody): ResponseData<Any>

    /**
     * 获取最新价格
     */
    @POST("api/market/getMarket/{delKey}")
    suspend fun getNewPrice(@Path("delKey") delKey: String): ResponseData<NewPrice>

    /**
     * 获取GFT k线数据
     */
    @POST("api/market/getKDataList")
    suspend fun getGFTKLineData(@Body params: RequestBody): ResponseData<List<GFTKLineData>>

    /**
     * 获取GFT简介
     */
    @POST("api/market/getCoinIntroduce/GFT")
    suspend fun getCoinIntroduce(): ResponseData<CoinIntroduce>

    /**
     * 获取GFT成交数据
     */
    @POST("api/market/getTickList")
    suspend fun getTickList(@Body params: RequestBody): ResponseData<List<Tick>>
}